<?php 
get_header();?>
<body id="bd" class=" wide fs3" >
	<div class="cfv71mega" style="display:none;"></div>
	<a name="Top" id="Top"></a>	
<div id="ja-wrapper">

<?php require_once 'loop/view-top-header.php';?>
<?php require_once 'loop/view-breadcrumbs.php';?>

<!-- END: HEADER -->
<div id="ja-containerwrap-fl">
<div id="ja-container" class="clearfix">
	<div id="ja-mainbody" class="clearfix">
		<!-- BEGIN: CONTENT -->
		<div id="ja-content"><div id="ja-content-top"><div id="ja-content-bot" class="clearfix">
				
			<div id="ja-current-content" class="clearfix">
  			
  			<?php   						 
				$pagetitle = 'Tin đã đăng';
				
				$userdata = get_userdata(get_current_user_id());
				
				if($userdata->roles[0]=='subscriber')
				{
					$args = array('post_type'=>'rao-vat','showposts' =>20,'author__in' => array(get_current_user_id()),'post_status' => array('publish', 'pending', 'draft','trash'));
					query_posts($args);
					?>
					<h1 class="componentheading">Thành viên - <?php echo $pagetitle;?></h1>
						<style>
						.listing_result{margin-bottom: 5px;}	
						</style>
			  			<div class="moduletable">
							<div class="ja-tabswrap default" style="width:100%;">	
							<div  id="myTab-365088772" class="container" >	
								<?php 
								if(have_posts()){
								while (have_posts()):
									the_post();
			
									include TEMPLATEPATH.'/loop/loop-t2.php';
								
								endwhile;	
								}
								else
								{
									echo 'Chưa có bài viết';
								}	
								?>		
							</div>
						</div>					 
					</div>
					<?php 
				}	
				else
					require_once 'loop/tpl-tindadang.php';			
  			?>
  			
			<?php //require_once 'loop/tpl-power-module.php';?>
			<div id="mypaging">
				<div class="mypaging">	
					<?php echo db_paginate();?>
				</div>	
			</div>				
	
		</div>
             
		</div>
		</div>
		</div>
		<!-- END: CONTENT -->
	  	
		</div>
		<!-- BEGIN: RIGHT COLUMN -->
		<!-- Side thanh viên -->
		<div id="ja-col2">
			<div class="ja-innerpad">
				<div class="module">
					<div>
						<div>
							<div>
								<h3 style="line-height: 45px;">THÔNG TIN THÀNH VIÊN</h3>
								 <div id="content">
									<span style="font-size: small;">							
									<p style="text-align: center;">
										<?php 
										global $userdata;
										//print_r($userdata);
										echo get_avatar( get_current_user_id(), '', '', '' ); 
										?> 
									</p>
									<span style="color: #003300;">
										<div style="text-align: center;">
											<strong><span style="font-size: medium;"><br><?php echo $userdata->display_name;?></span></strong>
										</div>
										<div style="text-align: center;">
											<strong><span style="font-size: 13px;">Email: <?php echo $userdata->user_email;?></span></strong>
										</div>
										<div style="text-align: center;">
											<strong><span style="font-size: 13px;">Quyền:: <?php echo $userdata->roles[0];?></span></strong>
										</div>
										<span style="color: #800000;"><span style="font-size: large;"> </span>
										<div style="text-align: center;"><strong>
											<span style="font-size: large;"> Hotline: 0983 888 381</span></strong></div>
										</span>
									</span>
									</span>                    
								</div>
							</div>
						</div>
					</div>
				</div>					
						
			</div>
			<!-- END: RIGHT COLUMN -->
		</div>
		
		
	
</div>
<!-- BEGIN: BOTTOM SPOTLIGHT -->
<?php //require_once 'loop/view-bottom.php';?>
<!-- END: BOTTOM SPOTLIGHT -->
			
<?php get_footer();?>